<?php
//echo $this->module->registerJsRoot('jquery.jeditable.mini.js');

/* Yii::app()->clientScript->registerScript('value','
  $("span[class*=\'editable\']").live("click", function (){
  $(this).editable("'.$this->createUrl('settings/edittable').'", {
  submitdata : function (value,settings){
  return {"id":$(this).attr("class").replace("editable-","")};
  },
  indicator : "Saving...",
  tooltip   : "Click to edit...",
  type : "textarea",
  //data   : "{\'1\':\'Active\',\'0\':\'Inactive\'}",
  submit   : "Lưu",
  name : "value"
  });
  });

  ',CClientScript::POS_READY); */

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('settings-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>
<div class="speedbar">
    <div class="speedbar-content">

        <ul class="menu-drop">
            <li><a href="#"><i class="icon-chevron-down"></i></a>
                <ul>
                    <li><a href="<?php echo Yii::app()->createUrl('admin/main/login'); ?>">Quản lý chung</a></li>
                    <li><a href="<?php echo Yii::app()->createUrl('admin/posts/update', array('id' => 40735020)); ?>">Bài viết giới thiệu</a></li>
                </ul>  
            </li>
        </ul>

        <ul class="menu-speedbar">
            <li><a href="<?php echo Yii::app()->createUrl('admin/posts/admin'); ?>" class="act_link">Quản lý bài viết</a></li>
            <li><a href="<?php echo Yii::app()->createUrl('admin/posts/create'); ?>">Tạo bài viết mới</a></li>
        </ul>
    </div>
</div>
<?php
$this->widget('zii.widgets.grid.CGridView', array(
    'id' => 'posts-grid',
    'dataProvider' => $model->search(),
    'filter' => $model,
    'columns' => array(
        'key',
        'value',
        array(
            'class' => 'CButtonColumn',
        ),
    ),
));
?>

